package dryven.view;

public class StackedViewData extends ViewData {

	private ViewDataDictionary _parentViewData;
	
	public StackedViewData(ViewDataDictionary parentViewData) {
		super();
		_parentViewData = parentViewData;
	}

	@Override
	public Object getRootValue(String name) {
		Object value = super.getRootValue(name);
		if(value==null) {
			value = _parentViewData.getRootValue(name);
		}
		return value;
	}

	@Override
	public Iterable<String> getRootValues() {
		// TODO combine root values for both
		return super.getRootValues();
	}
}
